<template>
  <div class="page-topic">
    <p>{{topic}}</p>
    <div class="back-previous" @click="backPrevious()"><img src="../assets/picture/previous-page.png" width="20" height="20"></div>
  </div>
</template>

<script>
  export default {
    name: 'topicBack',
    props: ['topic'],
    data () {
      return {
      }
    },
    methods: {
      backPrevious () {
        this.$router.go(-1)
      }
    }
  }
</script>

<style scope lang="scss">
  .page-topic{
    background: #ffdf58;
    width: 100%;
    height: 49px;
    position: relative;
    p{
      text-align: center;
      width: 100%;
      height: 100%;
      line-height: 49px;
    }
    .back-previous{
      position: absolute;
      left: 12px;
      top: 50%;
      margin-top: -10px;
    }
  }
</style>
